.toc {
  font-size: 12px;
  margin: 16px 0;
  padding-left: 0;
  border-left: 1px solid #ebedf0;
  list-style: none;
  > li {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    line-height: 1.5;
    &:not(:last-child) {
      margin-bottom: 4px;
    }
    &.depth- {
      &3 {
        padding-left: 16px;
      }
      &4 {
        padding-left: 32px;
      }
    }
  }
  li > ul {
    text-indent: 8px;
    font-size: 12px;
    display: none;
  }
  a {
    padding-left: 16px;
    display: block;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: @site-text-color;
    width: 110px;
    border-left: 1px solid transparent;
    margin-left: -1px;
    &:hover {
      color: @primary-color;
    }
    &.current {
      border-color: @primary-color;
      color: @primary-color;
    }
  }
  &-affix {
    position: absolute;
    top: 8px;
    right: 20px;
    .ant-affix {
      background: #fff;
      overflow: auto;
      max-height: ~'calc(100vh - 16px)';
      z-index: 9;
    }
    &-bottom {
      position: absolute;
      bottom: 88px;
      right: 20px;
      .ant-affix {
        background: #fff;
      }
    }
  }

  @media (max-width: @mobile-max) {
    display: none;
  }
}
